#ifndef OCDATABASEMAPPER_H
#define OCDATABASEMAPPER_H
#include <unordered_map>
#include <string>
#include "MySqlConnPool/include/sqlsetmanager.h"
class OCDatabaseMapper
{
public:
    static OCDatabaseMapper* getInstance();
    void initMapper();
    void addOC(const std::string oc,const std::string db_name);
    void updateOC(const std::string oldoc,const std::string newoc);
    void removeOC(const std::string oc);
    std::string getDB(std::string oc);
    std::unordered_map<std::string,std::string>& getMap();
private:
    OCDatabaseMapper();
    OCDatabaseMapper& operator=(const OCDatabaseMapper&)=delete;
    OCDatabaseMapper(const OCDatabaseMapper&)=delete;
    static OCDatabaseMapper* instance;
    std::unordered_map<std::string,std::string> oc_db;
};

#endif // OCDATABASEMAPPER_H
